﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Net;
using System.Net.Sockets;

namespace System.Net.DnsToolkit.SocketAsync {

    internal class UdpStateObject {

        internal UdpStateObject(SocketAsyncEventArgs saea, EndPoint remote, byte[] buffer, int offset, int length, object ticket) {
            this._saea = saea;
            this._remoteEndPoint = remote;
            this._buffer = buffer;
            this._offset = offset;
            this._length = length;
            this._ticket = ticket;

        }

        private SocketAsyncEventArgs _saea;
        public SocketAsyncEventArgs Saea {
            get {
                return _saea;
            }
            set {
                _saea = value;
            }
        }

        private readonly EndPoint _remoteEndPoint;
        internal EndPoint RemoteEndPoint {
            get {
                return _remoteEndPoint;
            }
        }

        private readonly byte[] _buffer;
        internal byte[] Buffer {
            get {
                return _buffer;
            }
        }

        private readonly int _offset;
        internal int Offset {
            get {
                return _offset;
            }
        }

        private readonly int _length;
        internal int Length {
            get {
                return _length;
            }
        }

        private readonly object _ticket;
        internal object Ticket {
            get {
                return _ticket;
            }
        }
    }


}
